import Vue from 'vue'
import App from './App'
import store from './store'
import { $get, $post } from './api/http.js'
import moment from 'moment';

// #ifdef  MP-WEIXIN

import ests from './util/yh_wx_sdk2.0.4.min.js'




Vue.prototype.$ests = ests
const globalConfig = {
  ts_app: '应用标识',//用于区分一个项目下的多个应用, 可选
  debug: true, // 设置打印埋点数据对象，可选 
  autoTrack:{
    appLaunch:false,
    appShow:false,
    pageShare:false
  },
  allow_amend_share_path:false
}
ests.tracking('qa1593744347881', globalConfig)
// #endif

// #ifdef  H5
import wechat from './static/h5/weixin'
Vue.prototype.$wechat = wechat
import './util/yh_h5_sdk2.0.4.min.js'

// #endif

import './assets/global.css'
import component from  './util/global'
Vue.use(component)
import VueClipboard from 'vue-clipboard2'
Vue.use(VueClipboard)
Vue.filter("initDate", function (date) {
  if (!date) console.error("date必传！！！");
  return moment(date).format("Y-M-D")
})
Vue.prototype.$get = $get
Vue.prototype.$post = $post
Vue.config.productionTip = false
App.mpType = 'app'

const app = new Vue({
  ...App,
  store
})
app.$mount()
export default app